import {request} from '@/plugins/axios'

//分页查询 列表
export function getRevenuePage(data, pageNum, pageSize) {
    return request({
        url: '/revenue/page?pageNum='+pageNum+'&pageSize='+pageSize,
        method: 'post',
        data:data
    })
}

//新增
export function saveRevenueApi(data,username) {
    return request({
        url: '/revenue/saveRevenue?username='+username,
        method: 'post',
        data:data
    })
}

//修改
export function updateRevenueApi(data,username){
    return request({
        url:'/revenue/updateRevenue?username='+username,
        method:'put',
        data:data
    })
}

//删除
export function deleteRevenueApi(id){
    return request({
        url:`/revenue/deleteRevenue/${id}`,
        method:'delete'
    })
}

//获取各年的总收益
export function getRevenueListApi(startY,endY){
    return request({
        url:'/revenue/getRevenueList?startY='+startY+'&endY='+endY,
        method:'get'
    })
}

//审核状态
export function updateRevenueStatusApi(data){
    return request({
        url:'/revenue/updateRevenueStatus',
        method:'put',
        data:data
    })
}
//审核驳回原因
export function rejectRevenueApi(data){
    return request({
        url:'/revenue/rejectRevenue',
        method:'put',
        data:data
    })
}